/*
 * utils.h
 *
 *  Created on: Mar 29, 2010
 *      Author: Lukasz Spintzyk
 */

#ifndef UTILS_H_
#define UTILS_H_

#ifndef PH_H_
#include "ph.h"
#endif

#ifndef INODE_H_
#include "Inode.h"
#endif

std::string remove_dots(const std::string& value);

std::string findLastName(const std::string& path);

std::string getParentDir(const std::string& path);

bool execute_ok(boost::shared_ptr<Inode> inode, uint16_t uid, uint16_t gid);

bool read_ok(boost::shared_ptr<Inode> inode, uint16_t uid, uint16_t gid);

bool is_dir(boost::shared_ptr<Inode> inode);

bool is_file(boost::shared_ptr<Inode> inode);

//TODO write can_acces_attr

#endif /* UTILS_H_ */
